/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package systole.persistence.brokersInterface;

import java.util.List;
import systole.domain.persons.Patient;
import systole.exceptions.ExceptionDAO;
import systole.synchronization.remote.entities.PatientRemote;

/**
 *
 * @author Juan Manuel
 */
public interface PatientSyncBroker {

    /**
     * 
     * @param patientRemote
     * @throws ExceptionDAO 
     */
    public void savePatientRemote(PatientRemote patientRemote) throws ExceptionDAO;


    /**
     * 
     * @return PatientRemote list
     * @throws ExceptionDAO 
     */
    public List<PatientRemote> getPatientsToUpdate() throws ExceptionDAO;

    /**
     * 
     * @return
     * @throws ExceptionDAO 
     */
    public List<Patient> getPatientsToUpload() throws ExceptionDAO;

    /**
     *
     * @return
     * @throws ExceptionDAO
     */
    public int getLastRemotePatientIdSynchronized() throws ExceptionDAO;

    /**
     * 
     * @param patient
     * @return
     * @throws ExceptionDAO
     */
    public PatientRemote getPatientRemoteByPatient(Patient patient) throws ExceptionDAO;

    /**
     * 
     * @param remoteId
     * @return
     * @throws ExceptionDAO
     */
    public Patient getPatientByRemoteId(int remoteId) throws ExceptionDAO;
}
